<?php

namespace Models;
use Phalcon\Mvc\Model\Validator\PresenceOf;


class Vote extends BaseModel
{
    public function initialize()
    {
        $this->hasMany("id", "Models\VoteOption", "id", array('alias' => 'VoteOption'));
    }

    public function notSave()
    {
        $flash = $this->getDI()->getFlash();
        foreach ($this->getMessages() as $message) {
            $flash->error($message);
        }
    }


}
